import { getStore } from "@/util/store";
export const hidden = (Vue) => {
  Vue.directive("hidden", {
    // 当绑定元素插入到DOM中时
    inserted: function (el) {
      const data = getStore({ name: "userInfo" });
      if (data && data.is_admin > 0) {
        // 聚焦元素
        el.remove();
      }
    },
  });
};
